home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 353_02 / elemlist.h < prev    next >
C/C++ Source or Header  |  1992-01-18  |  785b  |  32 lines

  1.                                       // Chapter 11 - Program 6
  2. #ifndef ELEMLIST_H
  3. #define ELEMLIST_H
  4.  
  5. #define NULL 0
  6. #include "person.h"
  7.  
  8. class employee_list;                // Forward declaration
  9.  
  10. class employee_element {            // One element of the linked list
  11.    person *employee_data;
  12.    employee_element *next_employee;
  13. public:
  14.    employee_element(person *new_employee)
  15.                    {next_employee = NULL;
  16.                     employee_data = new_employee;};
  17.    friend class employee_list;
  18. };
  19.  
  20.  
  21.  
  22. class employee_list {                // The linked list
  23.    employee_element *start;
  24.    employee_element *end_of_list;
  25. public:
  26.    employee_list() {start = NULL;}
  27.    void add_person(person *new_employee);
  28.    void display_list(void);
  29. };
  30.  
  31. #endif
  32.